<%@ page import="com.google.appengine.a4ieve.entities.AchievementWrapper" %>
<%@ page import="java.util.List" %>
<%@ page import="com.google.appengine.api.datastore.*" %>
<%@ page import="java.util.logging.Logger" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%--<%//single use only--%>
    <%--DatastoreService service = DatastoreServiceFactory.getDatastoreService();--%>
    <%--Query q = new Query(AchievementWrapper.KIND_KEY).setKeysOnly();--%>
    <%--List<Entity> result = service.prepare(q).asList(FetchOptions.Builder.withDefaults());--%>
    <%--%>--%>
<%--<%= result.size()%>--%>
<%--<%--%>
    <%--try {--%>
        <%--for (Entity e : result) {--%>
            <%--Entity full = service.get(e.getKey());--%>
            <%--%><%= full.getProperty(AchievementWrapper.PROPOSED_BY)%> <br/><%--%>
            <%--if (full.getProperty(AchievementWrapper.GROUP_PROPERTY) == null) {--%>
                <%--%> <p>Setting values</p><%--%>
                <%--Transaction t = service.beginTransaction();--%>
<%--//                Key newKey = KeyFactory.createKey(AchievementWrapper.KIND_KEY, (String)full.getProperty(AchievementWrapper.USER_ID_PROPERTY));--%>
<%--//                Entity newEntity = new Entity(AchievementWrapper.KIND_KEY, newKey);--%>
<%--//                newEntity.setPropertiesFrom(full);--%>
<%--//                newEntity.setProperty(AchievementWrapper.PROPOSED_BY, "oleh.lunin");--%>
<%--//                newEntity.setProperty(AchievementWrapper.APPROVED_BY, "forartforces");--%>
<%--//                full.setPropertiesFrom(full);--%>
                <%--full.setProperty(AchievementWrapper.GROUP_PROPERTY, "boreas");--%>
<%--//                full.setProperty(AchievementWrapper.APPROVED_BY, "forartforces");--%>
<%--//                if (full.getProperty(AchievementWrapper.STATUS_PROPERTY).equals("earned")) {--%>
<%--////                    newEntity.setUnindexedProperty(AchievementWrapper.IS_POSITIVE, 1);--%>
<%--//                    full.setUnindexedProperty(AchievementWrapper.IS_POSITIVE, 1);--%>
<%--//                } else {--%>
<%--////                    newEntity.setUnindexedProperty(AchievementWrapper.IS_POSITIVE, null);--%>
<%--//                    full.setUnindexedProperty(AchievementWrapper.IS_POSITIVE, null);--%>
<%--//                }--%>
<%--//                service.put(newEntity);--%>
                <%--if (full.getProperty(AchievementWrapper.ORIGINAL_PICTURE) == null) {--%>
                    <%--full.setProperty(AchievementWrapper.ORIGINAL_PICTURE, null);--%>
                <%--}--%>
                <%--service.put(full);--%>
                <%--t.commit();--%>
            <%--}--%>

        <%--}--%>
    <%--} catch (EntityNotFoundException e){--%>
        <%--Logger.getAnonymousLogger().severe("Found entity with key; however, it was not present");--%>
    <%--}--%>
<%--%>--%>